
import {type BaseResponse} from '@/webApis/base';

const comments = [
    {
        spuId: '1722045',
        skuId: null,
        specInfo: null,
        commentContent:
            '收到货了，第一时间试了一下，很漂亮特别喜欢，大爱大爱，颜色也很好看。棒棒!',
        commentScore: 4,
        uid: '88881048075',
        userName: 'Dean',
        userHeadUrl: 'https://wx.qlogo.cn/mmopen/vi_32/5mKrvn3ibyDNaDZSZics3aoKlz1cv0icqn4EruVm6gKjsK0xvZZhC2hkUkRWGxlIzOEc4600JkzKn9icOLE6zjgsxw/132',
    }
]
/**
 * 置顶评价
 */
const topComments = [
    {
        spuId: '1722045',
        skuId: null,
        specInfo: null,
        commentContent:
            '收到货了，第一时间试了一下，很漂亮特别喜欢，大爱大爱，颜色也很好看。棒棒!',
        commentScore: 4,
        uid: '88881048075',
        userName: 'Dean',
        userHeadUrl: 'https://wx.qlogo.cn/mmopen/vi_32/5mKrvn3ibyDNaDZSZics3aoKlz1cv0icqn4EruVm6gKjsK0xvZZhC2hkUkRWGxlIzOEc4600JkzKn9icOLE6zjgsxw/132',
        images: [
            'https://soonsmart.keji.io/douyin/upfile/874CF5941704157763589B815.png',
            'https://soonsmart.keji.io/douyin/upfile/F816E1D3170415776498850BA.png',
            'https://soonsmart.keji.io/iopctem/2023-12/20/1703060184653.jpg',
            'https://soonsmart.keji.io/douyin/upfile/0960C5A8170415776536973AE.png',
        ]
    }
]
const commentsCount = {
    commentCount: '47',
    badCount: '0',
    middleCount: '2',
    goodCount: '45',
    hasImageCount: '1',
    goodRate: 95.7,
    uidCount: '0',
}

export namespace comment{
	
	export const getPageListAsync = async (data:{pageNum:number, pageSize:number,menuName:string}):Promise<BaseResponse> => {
	    return new Promise((resolve) => {
	        setTimeout(() => {
				let response:BaseResponse = {
				    rows: comments,
					total: comments.length,
				}
				resolve(response);
	        }, 100);
	    })
	}
	/**
	 * 获取置顶评论
	 */
	export const getCommentsTopAsync = async (): Promise<BaseResponse> => {
	    return new Promise((resolve) => {
	        setTimeout(() => {
	            resolve({
					rows:{
						topComments,
						commentsCount,
					},
				});
	        }, 100);
	    })
	}
}